package ch.fusun.baron.player;

import java.util.List;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.player.api.PlayerService;

/**
 * Removes players from the appropriate dynasties
 */
public class RemovePlayerUpdateData implements DataUpdate {

    @Inject
    private transient PlayerService service;
    private List<Player> players;

    /**
     * Kryo
     */
    public RemovePlayerUpdateData() {
    }

    /**
     * @param players
     *            The players to be removed
     */
    public RemovePlayerUpdateData(List<Player> players) {
        this.players = players;
    }

    @Override
    public void update() {
        service.removePlayers(this.players);
    }
}
